package com.fowo.api.flow.job;

import com.fowo.api.flow.utils.IdWorker;
import com.fowo.api.flow.utils.SpringContextHolder;
import org.flowable.common.engine.impl.cfg.IdGenerator;
import org.springframework.stereotype.Component;

/**
 * @fileName: IdWorkerIdGenerator
 * @Description: 代码目的，作用，如何工作
 * @Author: pzh
 * @Date: 2023/3/27 0027 10:42
 */
@Component
public class IdWorkerIdGenerator implements IdGenerator {

  @Override
  public String getNextId() {
    return SpringContextHolder.getBean(IdWorker.class).nextId()+"";
  }
}
